export const STUDENT = 2
export const TEACHER = 1
export const MANAGER = 3

class Homework {
    //homework的状态
    Status (status) {
        return(
            {
                init:     '未完成',
                answered: '已交',
                finished: '完成',
                revising: '待订',
                revised:  '已订'
            }[status]
        )
    }
}

class Notification {
    // Notification的状态
    Status (status) {
        return {
            true: '已读',
            false: '未读'
        }[status]
    }
}

class User {
    Role = {
        Student: STUDENT,
        Teacher: TEACHER,
        Manager: MANAGER
    }
}


const Enumeration = {
    Homework: new Homework,
    Notification: new Notification,
    User: new User
}

export default Enumeration

/*
    Enumeration.Homework.Status('$your status')
    => '$Enumerized status'
*/